﻿using CoreShop.Model.FromBody;
using CoreShop.Model.UI;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{

    /// <summary>
    /// 通用实体
    /// </summary>
    public class DatabaseModel
    {
        /// <summary>
        /// 序列
        /// </summary>
        public Int64 id { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public String number { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public String name { get; set; }        
    }

    /// <summary>
    /// 通用实体
    /// </summary>
    public class DataTypeModel
    {
        /// <summary>
        /// 序列
        /// </summary>
        public Int64 id { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public int type { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public string name { get; set; }
    }

    /// <summary>
    /// 通用实体
    /// </summary>
    public class DeskTypeModel
    {
        /// <summary>
        /// 序列
        /// </summary>
        public Int64 id { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public int type { get; set; }

        /// <summary>
        /// 桌台分类Id
        /// </summary>
        public long categoryId { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public string name { get; set; }
    }


    /// <summary>
    /// 通用实体
    /// </summary>
    public class FoodReqModel
    {
        /// <summary>
        /// 类型
        /// </summary>
        public Int64 foodTypeId { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public string name { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class DeskOpenRequestModel
    {
        /// <summary>
        /// 桌台Id
        /// </summary>
        public long deskId { get; set; }

        /// <summary>
        /// 就餐人数
        /// </summary>
        public int person { get; set; }

        /// <summary>
        /// 会员id
        /// </summary>
        public long memberId { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class OrderingReqModel
    {
        /// <summary>
        /// 明细Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 订单Id
        /// </summary>
        public long orderId { get; set; }

        /// <summary>
        /// 桌台Id
        /// </summary>
        public long deskId { get; set; }
    }


    /// <summary>
    /// 请求实体
    /// </summary>
    public class OrderingMemberModel
    {
        /// <summary>
        /// 明细Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 订单Id
        /// </summary>
        public long orderId { get; set; }

        /// <summary>
        /// 会员Id
        /// </summary>
        public long memberId { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class DiscountReqModel
    {
        /// <summary>
        /// 明细Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 订单Id
        /// </summary>
        public long orderId { get; set; }

        /// <summary>
        /// 类型(0整单折扣,1单品打折)
        /// </summary>
        public int type { get; set; }

        /// <summary>
        /// 折扣值
        /// </summary>
        public int value { get; set; }

        /// <summary>
        /// 打折原因
        /// </summary>
        public string desc { get; set; } = "";
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class FoodRefundReqModel
    {
        /// <summary>
        /// 退菜原因Id
        /// </summary>
        public long tagId { get; set; }

        /// <summary>
        /// 退菜人Id
        /// </summary>
        public long billerId { get; set; }

        /// <summary>
        /// 退菜人
        /// </summary>
        public string billerName { get; set; }

        /// <summary>
        /// 退菜数量
        /// </summary>
        public List<OrderingQuantity> items { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class OrderingQuantity
    {
        /// <summary>
        /// 明细Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 订单Id
        /// </summary>
        public long orderId { get; set; }

        /// <summary>
        /// 退菜数量
        /// </summary>
        public decimal quantity { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class SettlementReqModel
    {
        /// <summary>
        /// 订单Id
        /// </summary>
        public long orderId { get; set; }

        /// <summary>
        /// 优惠券Id
        /// </summary>
        public long couponId { get; set; }

        /// <summary>
        /// 实收金额
        /// </summary>
        public decimal orderAmount { get; set; }

        /// <summary>
        ///  支付状态(0 未付款1 已预结2 已支付)
        /// </summary>
        public Int32 payStatus { get; set; }

        /// <summary>
        /// 支付信息
        /// </summary>
        public List<corecmsfoodorderpayment> payment { get; set; }

        /// <summary>
        /// 余额支付流水
        /// </summary>
        public  corecmsuserbalance balance { get; set; }

    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class PrintBillModel
    {
        /// <summary>
        /// 订单Id
        /// </summary>
        public long orderId { get; set; }

        /// <summary>
        /// 人数
        /// </summary>
        public int printerId { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class OrderPerson
    {
        /// <summary>
        /// 订单Id
        /// </summary>
        public long orderId { get; set; }

        /// <summary>
        /// 人数
        /// </summary>
        public int person { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class FeedReqModel
    {
        /// <summary>
        /// Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal price { get; set; }
    }

    /// <summary>
    /// 请求实体
    /// </summary>
    public class OrderReqModel
    {
        /// <summary>
        /// 订单
        /// </summary>
        public List<corecmsfoodordermaster> orderMasterList { get; set; }

        /// <summary>
        /// 订单详细
        /// </summary>
        public List<corecmsfoodorderdetail> orderDetailList { get; set; }

        /// <summary>
        /// 商品做法
        /// </summary>
        public List<corecmsfoodordertask> orderTaskList { get; set; }

        /// <summary>
        /// 商品加料
        /// </summary>
        public List<corecmsfoodorderfeed> orderFeedList { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        public List<corecmsfoodorderpayment> orderPaymentList { get; set; }


        /// <summary>
        /// 余额流水-小程序余额支付推送至前台用于前台发起退款
        /// </summary>
        public List<corecmsuserbalance> userBalanceList { get; set; }

        public corecmstakeoutdetail takeoutdetail { get; set; }

    }


}
